home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
presto
/
prest1_0.lha
/
src
/
stack.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-11
|
929b
|
52 lines
//
// Stack maintenance
//
// Modification History:
//
// 05-Dec-89 John Faust
// Remove all stack free lists. Allocate stacks of fixed size when thread
// is allocated. Stack remains associated with owning thread. More
// efficient (removes search of stack freelist for stack of proper size,
// allocation of stack if one of proper size not found, and eliminates
// need to balance stack freelists).
//
// 16-Nov-1989 John Faust
// Add support for per-processor stack freelists.
//
#include "presto.h"
Stack::Stack(int sz)
{
//
// Init stack - overloaded new
// will have allocated space for us
//
// stackcnt++;
if (sz) {
sz = sz &(~0x200); // force page size boundaries
}
st_base = (int*)new char[sz];
st_size = sz;
st_limit = sz;
}
//static shared_t stackcnt = 0;
int
Stack::numstacksbuilt()
{
// return stackcnt;
return -1;
}